<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LibTools: H:/project/LibTools/src/thread/Event.cpp 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LibTools
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.16 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','搜索');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_bfedb72b9d87795234454f6223b9ab1e.html">thread</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">Event.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_event_8cpp.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_event_8h.html">Event.h</a>&quot;</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_shared_ptr_8h.html">SharedPtr.h</a>&quot;</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &lt;stdexcept&gt;</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160; </div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<a class="code" href="tools_8h.html#a201ce692c9dca6599e5c12d00167419b">DEF_BEG_LIBTOOLS</a></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160; </div>
<div class="line"><a name="l00007"></a><span class="lineno"><a class="line" href="class_c_event.html#ae2c9888dbf2c9684be63500e25bae8df">    7</a></span>&#160;<a class="code" href="class_c_event.html#ae2c9888dbf2c9684be63500e25bae8df">CEvent::CEvent</a>(<span class="keywordtype">bool</span> status <span class="comment">/*= false*/</span>, <span class="keywordtype">bool</span> reset <span class="comment">/*= true*/</span>)</div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;{</div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;     <a class="code" href="class_c_event.html#a8d111caf7221ea4c35980af8bae632c4">_event</a> = <a class="code" href="namespace_share_api.html#a7b6335c0eefe4ed1f01963638bc708b8">ShareApi::CreateEvent</a>(status ? <a class="code" href="tools_8h.html#aa8cecfc5c5c054d2875c03e77b7be15d">TRUE</a> : <a class="code" href="tools_8h.html#aa93f0eb578d23995850d61f7d61c55c1">FALSE</a>, reset ? <a class="code" href="tools_8h.html#aa8cecfc5c5c054d2875c03e77b7be15d">TRUE</a> : <a class="code" href="tools_8h.html#aa93f0eb578d23995850d61f7d61c55c1">FALSE</a>);</div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_c_event.html#a8d111caf7221ea4c35980af8bae632c4">_event</a> == 0) <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">&quot;create event failed!&quot;</span>);</div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;}</div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160; </div>
<div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="class_c_event.html#ad088f3ce4e9585ce8fadafb5655511fb">   13</a></span>&#160;<a class="code" href="class_c_event.html#ad088f3ce4e9585ce8fadafb5655511fb">CEvent::~CEvent</a>()</div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;{</div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;    <a class="code" href="namespace_share_api.html#a7ee205cb7095e6d00b9631fa1857a6c3">ShareApi::CloseEvent</a>(<a class="code" href="class_c_event.html#a8d111caf7221ea4c35980af8bae632c4">_event</a>);</div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;     <a class="code" href="class_c_event.html#a8d111caf7221ea4c35980af8bae632c4">_event</a> = 0;</div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;}</div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160; </div>
<div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="class_c_event.html#a19b3ef35c853d54d2debf57c9368ca3f">   19</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_c_event.html#a19b3ef35c853d54d2debf57c9368ca3f">CEvent::SetEvent</a>(<span class="keywordtype">bool</span> status)</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;{</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;    <a class="code" href="namespace_share_api.html#aef9c08d248e17a517235723ef2db9663">ShareApi::SetEvent</a>(<a class="code" href="class_c_event.html#a8d111caf7221ea4c35980af8bae632c4">_event</a>, status ? <a class="code" href="tools_8h.html#aa8cecfc5c5c054d2875c03e77b7be15d">TRUE</a> : <a class="code" href="tools_8h.html#aa93f0eb578d23995850d61f7d61c55c1">FALSE</a>);</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;}</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160; </div>
<div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="class_c_event.html#a72f175fe274eb8aa4b6f5c49c13a4a45">   24</a></span>&#160;<a class="code" href="_wait_status_8h.html#aefc65d67c2144bee893b543992f694e2">wt_status</a> <a class="code" href="class_c_event.html#a72f175fe274eb8aa4b6f5c49c13a4a45">CEvent::Wait</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> pred)</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;{</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    <a class="code" href="_wait_status_8h.html#aefc65d67c2144bee893b543992f694e2">wt_status</a> s = <a class="code" href="_wait_status_8h.html#aefc65d67c2144bee893b543992f694e2a4bd1a15e26106a96f59ca7f845da61b6">wt_notimeout</a>;</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    <a class="code" href="tools_8h.html#a798af1e30bc65f319c1a246cecf59e39">DWORD</a> ret = <a class="code" href="namespace_share_api.html#a13ed8016535f6825c83eedef069ebe41">ShareApi::WaitForSingleEvent</a>(<a class="code" href="class_c_event.html#a8d111caf7221ea4c35980af8bae632c4">_event</a>, pred);</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160; </div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;    <span class="keywordflow">if</span> (ret == <a class="code" href="tools_8h.html#ac5425c25bf79dba241265bcc8f869715">WAIT_FAILED</a>) s = <a class="code" href="_wait_status_8h.html#aefc65d67c2144bee893b543992f694e2a2dd503e7f6d292988059c0a19995c6c6">wt_abort</a>;</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (ret == <a class="code" href="tools_8h.html#a5578de68603dc6185924f95f1ae4be6e">WAIT_TIMEOUT</a>) s = <a class="code" href="_wait_status_8h.html#aefc65d67c2144bee893b543992f694e2ae995bd119ed6181e5914ecbd41979584">wt_timeout</a>;</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160; </div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    <span class="keywordflow">return</span> s;</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;}</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160; </div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="class_c_event.html#a16992490c352dc9ad55430d5dc91698d">   35</a></span>&#160;<a class="code" href="_wait_status_8h.html#aefc65d67c2144bee893b543992f694e2">wt_status</a> <a class="code" href="class_c_event.html#a16992490c352dc9ad55430d5dc91698d">CEvent::Wait_Forever</a>()</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;{</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    <a class="code" href="_wait_status_8h.html#aefc65d67c2144bee893b543992f694e2">wt_status</a> s = <a class="code" href="_wait_status_8h.html#aefc65d67c2144bee893b543992f694e2a4bd1a15e26106a96f59ca7f845da61b6">wt_notimeout</a>;</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    <a class="code" href="tools_8h.html#a798af1e30bc65f319c1a246cecf59e39">DWORD</a> ret = <a class="code" href="namespace_share_api.html#a13ed8016535f6825c83eedef069ebe41">ShareApi::WaitForSingleEvent</a>(<a class="code" href="class_c_event.html#a8d111caf7221ea4c35980af8bae632c4">_event</a>, <a class="code" href="tools_8h.html#aa84a29002ab81c719c0d07bb446296e0">INFINITE</a>);</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160; </div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    <span class="keywordflow">if</span> (ret == <a class="code" href="tools_8h.html#ac5425c25bf79dba241265bcc8f869715">WAIT_FAILED</a>) s = <a class="code" href="_wait_status_8h.html#aefc65d67c2144bee893b543992f694e2a2dd503e7f6d292988059c0a19995c6c6">wt_abort</a>;</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (ret == <a class="code" href="tools_8h.html#a5578de68603dc6185924f95f1ae4be6e">WAIT_TIMEOUT</a>) s = <a class="code" href="_wait_status_8h.html#aefc65d67c2144bee893b543992f694e2ae995bd119ed6181e5914ecbd41979584">wt_timeout</a>;</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160; </div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    <span class="keywordflow">return</span> s;</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;}</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160; </div>
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="class_c_event.html#a0f46504df9e8a7c2c500209a15af0987">   46</a></span>&#160;<a class="code" href="tools_8h.html#a01e895c2df346ffe662bbe69686d8d51">SYNCHANDLE</a> <a class="code" href="class_c_event.html#a0f46504df9e8a7c2c500209a15af0987">CEvent::Handle</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="keyword"></span>{</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_c_event.html#a8d111caf7221ea4c35980af8bae632c4">_event</a>;</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;}</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160; </div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="class_c_wait_multi_event.html#a69020a877db80762259231435f32c309">   51</a></span>&#160;<a class="code" href="class_c_wait_multi_event.html#a69020a877db80762259231435f32c309">CWaitMultiEvent::CWaitMultiEvent</a>(<span class="keyword">const</span> std::vector&lt;CEventBase*&gt;&amp; ves, <span class="keywordtype">bool</span> waitall, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> pred, <a class="code" href="_wait_status_8h.html#aefc65d67c2144bee893b543992f694e2">wt_status</a>&amp; status, <span class="keywordtype">int</span> *index <span class="comment">/* = 0 */</span>)</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;{</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    <a class="code" href="class_shared_ptr.html">SharedPtr&lt;SYNCHANDLE&gt;</a> es(<span class="keyword">new</span> <a class="code" href="tools_8h.html#a01e895c2df346ffe662bbe69686d8d51">SYNCHANDLE</a>[ves.size()]);</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> i = 0; i &lt; ves.size(); i++) es.<a class="code" href="class_shared_ptr.html#a0f15d2d3d2834b0667791f3abfd9e0d7">Get</a>()[i] = ves[i]-&gt;Handle();</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160; </div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    status = <a class="code" href="_wait_status_8h.html#aefc65d67c2144bee893b543992f694e2a4bd1a15e26106a96f59ca7f845da61b6">wt_notimeout</a>;</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    <a class="code" href="tools_8h.html#a798af1e30bc65f319c1a246cecf59e39">DWORD</a> ret = <a class="code" href="namespace_share_api.html#a13aef8d6aaac3071ccedf693c7d03f27">ShareApi::WaitForMultipleEvents</a>(es.Get(), (<a class="code" href="_find_file_8h.html#a37cc1038758216808d5f75090b093c9a">int</a>)ves.size(), waitall ? <a class="code" href="tools_8h.html#aa8cecfc5c5c054d2875c03e77b7be15d">TRUE</a> : <a class="code" href="tools_8h.html#aa93f0eb578d23995850d61f7d61c55c1">FALSE</a>, pred);</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160; </div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    <span class="keywordflow">if</span> (ret == <a class="code" href="tools_8h.html#ac5425c25bf79dba241265bcc8f869715">WAIT_FAILED</a>) status = <a class="code" href="_wait_status_8h.html#aefc65d67c2144bee893b543992f694e2a2dd503e7f6d292988059c0a19995c6c6">wt_abort</a>;</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (ret == <a class="code" href="tools_8h.html#a5578de68603dc6185924f95f1ae4be6e">WAIT_TIMEOUT</a>) status = <a class="code" href="_wait_status_8h.html#aefc65d67c2144bee893b543992f694e2ae995bd119ed6181e5914ecbd41979584">wt_timeout</a>;</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    {</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        <span class="keywordflow">if</span> (index) *index = (<a class="code" href="_find_file_8h.html#a37cc1038758216808d5f75090b093c9a">int</a>)ret;</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    }</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;}</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160; </div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="class_c_wait_multi_event_forever.html#a2ecd800109c43de95c0ffdb6010f9d91">   67</a></span>&#160;<a class="code" href="class_c_wait_multi_event_forever.html#a2ecd800109c43de95c0ffdb6010f9d91">CWaitMultiEventForever::CWaitMultiEventForever</a>(<span class="keyword">const</span> std::vector&lt;CEventBase*&gt;&amp; ves, <span class="keywordtype">bool</span> waitall, <a class="code" href="_wait_status_8h.html#aefc65d67c2144bee893b543992f694e2">wt_status</a>&amp; status, <span class="keywordtype">int</span> *index <span class="comment">/* = 0 */</span>)</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;{</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    <a class="code" href="class_c_wait_multi_event.html">CWaitMultiEvent</a>(ves, waitall, <a class="code" href="tools_8h.html#aa84a29002ab81c719c0d07bb446296e0">INFINITE</a>, status, index);</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;}</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160; </div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;<a class="code" href="tools_8h.html#ac909db71799bb22cb7d636a34cd785e4">DEF_END_LIBTOOLS</a></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclass_c_wait_multi_event_html_a69020a877db80762259231435f32c309"><div class="ttname"><a href="class_c_wait_multi_event.html#a69020a877db80762259231435f32c309">CWaitMultiEvent::CWaitMultiEvent</a></div><div class="ttdeci">CWaitMultiEvent(const std::vector&lt; CEventBase * &gt; &amp;ves, bool waitall, unsigned int pred, wt_status &amp;status, int *index=0)</div><div class="ttdoc">等待多个事件</div><div class="ttdef"><b>Definition:</b> <a href="_event_8cpp_source.html#l00051">Event.cpp:51</a></div></div>
<div class="ttc" id="anamespace_share_api_html_a13aef8d6aaac3071ccedf693c7d03f27"><div class="ttname"><a href="namespace_share_api.html#a13aef8d6aaac3071ccedf693c7d03f27">ShareApi::WaitForMultipleEvents</a></div><div class="ttdeci">LIBTOOLS DWORD WaitForMultipleEvents(SYNCHANDLE *hEvents, int nEventCount, BOOL bWaitAll, DWORD dwWaitOut)</div><div class="ttdoc">等待多个事件对象有信号</div><div class="ttdef"><b>Definition:</b> <a href="_share_api_8cpp_source.html#l01439">ShareApi.cpp:1439</a></div></div>
<div class="ttc" id="a_wait_status_8h_html_aefc65d67c2144bee893b543992f694e2a4bd1a15e26106a96f59ca7f845da61b6"><div class="ttname"><a href="_wait_status_8h.html#aefc65d67c2144bee893b543992f694e2a4bd1a15e26106a96f59ca7f845da61b6">wt_notimeout</a></div><div class="ttdoc">未超时</div><div class="ttdef"><b>Definition:</b> <a href="_wait_status_8h_source.html#l00013">WaitStatus.h:13</a></div></div>
<div class="ttc" id="aclass_c_event_html_a8d111caf7221ea4c35980af8bae632c4"><div class="ttname"><a href="class_c_event.html#a8d111caf7221ea4c35980af8bae632c4">CEvent::_event</a></div><div class="ttdeci">SYNCHANDLE _event</div><div class="ttdef"><b>Definition:</b> <a href="_event_8h_source.html#l00077">Event.h:77</a></div></div>
<div class="ttc" id="aclass_shared_ptr_html"><div class="ttname"><a href="class_shared_ptr.html">SharedPtr</a></div><div class="ttdoc">智能指针</div><div class="ttdef"><b>Definition:</b> <a href="_shared_ptr_8h_source.html#l00119">SharedPtr.h:119</a></div></div>
<div class="ttc" id="atools_8h_html_aa8cecfc5c5c054d2875c03e77b7be15d"><div class="ttname"><a href="tools_8h.html#aa8cecfc5c5c054d2875c03e77b7be15d">TRUE</a></div><div class="ttdeci">#define TRUE</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00147">tools.h:147</a></div></div>
<div class="ttc" id="aclass_c_event_html_a19b3ef35c853d54d2debf57c9368ca3f"><div class="ttname"><a href="class_c_event.html#a19b3ef35c853d54d2debf57c9368ca3f">CEvent::SetEvent</a></div><div class="ttdeci">virtual void SetEvent(bool status)</div><div class="ttdoc">设置事件是否有信号</div><div class="ttdef"><b>Definition:</b> <a href="_event_8cpp_source.html#l00019">Event.cpp:19</a></div></div>
<div class="ttc" id="aclass_shared_ptr_html_a0f15d2d3d2834b0667791f3abfd9e0d7"><div class="ttname"><a href="class_shared_ptr.html#a0f15d2d3d2834b0667791f3abfd9e0d7">SharedPtr::Get</a></div><div class="ttdeci">Ty * Get()</div><div class="ttdef"><b>Definition:</b> <a href="_shared_ptr_8h_source.html#l00202">SharedPtr.h:202</a></div></div>
<div class="ttc" id="anamespace_share_api_html_a7b6335c0eefe4ed1f01963638bc708b8"><div class="ttname"><a href="namespace_share_api.html#a7b6335c0eefe4ed1f01963638bc708b8">ShareApi::CreateEvent</a></div><div class="ttdeci">LIBTOOLS SYNCHANDLE CreateEvent(BOOL bEvent=FALSE, BOOL bAuto=TRUE)</div><div class="ttdoc">创建事件</div><div class="ttdef"><b>Definition:</b> <a href="_share_api_8cpp_source.html#l01257">ShareApi.cpp:1257</a></div></div>
<div class="ttc" id="aclass_c_event_html_ad088f3ce4e9585ce8fadafb5655511fb"><div class="ttname"><a href="class_c_event.html#ad088f3ce4e9585ce8fadafb5655511fb">CEvent::~CEvent</a></div><div class="ttdeci">virtual ~CEvent()</div><div class="ttdef"><b>Definition:</b> <a href="_event_8cpp_source.html#l00013">Event.cpp:13</a></div></div>
<div class="ttc" id="aclass_c_wait_multi_event_forever_html_a2ecd800109c43de95c0ffdb6010f9d91"><div class="ttname"><a href="class_c_wait_multi_event_forever.html#a2ecd800109c43de95c0ffdb6010f9d91">CWaitMultiEventForever::CWaitMultiEventForever</a></div><div class="ttdeci">CWaitMultiEventForever(const std::vector&lt; CEventBase * &gt; &amp;ves, bool waitall, wt_status &amp;status, int *index=0)</div><div class="ttdoc">一直等待多个事件,直到某个事件或全部事件有信号为止</div><div class="ttdef"><b>Definition:</b> <a href="_event_8cpp_source.html#l00067">Event.cpp:67</a></div></div>
<div class="ttc" id="anamespace_share_api_html_a7ee205cb7095e6d00b9631fa1857a6c3"><div class="ttname"><a href="namespace_share_api.html#a7ee205cb7095e6d00b9631fa1857a6c3">ShareApi::CloseEvent</a></div><div class="ttdeci">LIBTOOLS void CloseEvent(SYNCHANDLE hEvent)</div><div class="ttdoc">销毁事件句柄</div><div class="ttdef"><b>Definition:</b> <a href="_share_api_8cpp_source.html#l01558">ShareApi.cpp:1558</a></div></div>
<div class="ttc" id="atools_8h_html_a201ce692c9dca6599e5c12d00167419b"><div class="ttname"><a href="tools_8h.html#a201ce692c9dca6599e5c12d00167419b">DEF_BEG_LIBTOOLS</a></div><div class="ttdeci">#define DEF_BEG_LIBTOOLS</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00036">tools.h:36</a></div></div>
<div class="ttc" id="atools_8h_html_aa84a29002ab81c719c0d07bb446296e0"><div class="ttname"><a href="tools_8h.html#aa84a29002ab81c719c0d07bb446296e0">INFINITE</a></div><div class="ttdeci">#define INFINITE</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00159">tools.h:159</a></div></div>
<div class="ttc" id="atools_8h_html_ac5425c25bf79dba241265bcc8f869715"><div class="ttname"><a href="tools_8h.html#ac5425c25bf79dba241265bcc8f869715">WAIT_FAILED</a></div><div class="ttdeci">#define WAIT_FAILED</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00162">tools.h:162</a></div></div>
<div class="ttc" id="atools_8h_html_a5578de68603dc6185924f95f1ae4be6e"><div class="ttname"><a href="tools_8h.html#a5578de68603dc6185924f95f1ae4be6e">WAIT_TIMEOUT</a></div><div class="ttdeci">#define WAIT_TIMEOUT</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00161">tools.h:161</a></div></div>
<div class="ttc" id="a_find_file_8h_html_a37cc1038758216808d5f75090b093c9a"><div class="ttname"><a href="_find_file_8h.html#a37cc1038758216808d5f75090b093c9a">int</a></div><div class="ttdeci">DEF_BEG_LIBTOOLS typedef int(__stdcall *_CallBackFindFile)(TCHAR *szCurPath</div><div class="ttdoc">遍历目录的回调函数</div></div>
<div class="ttc" id="a_wait_status_8h_html_aefc65d67c2144bee893b543992f694e2ae995bd119ed6181e5914ecbd41979584"><div class="ttname"><a href="_wait_status_8h.html#aefc65d67c2144bee893b543992f694e2ae995bd119ed6181e5914ecbd41979584">wt_timeout</a></div><div class="ttdoc">超时</div><div class="ttdef"><b>Definition:</b> <a href="_wait_status_8h_source.html#l00014">WaitStatus.h:14</a></div></div>
<div class="ttc" id="a_wait_status_8h_html_aefc65d67c2144bee893b543992f694e2a2dd503e7f6d292988059c0a19995c6c6"><div class="ttname"><a href="_wait_status_8h.html#aefc65d67c2144bee893b543992f694e2a2dd503e7f6d292988059c0a19995c6c6">wt_abort</a></div><div class="ttdoc">发生异常</div><div class="ttdef"><b>Definition:</b> <a href="_wait_status_8h_source.html#l00015">WaitStatus.h:15</a></div></div>
<div class="ttc" id="atools_8h_html_ac909db71799bb22cb7d636a34cd785e4"><div class="ttname"><a href="tools_8h.html#ac909db71799bb22cb7d636a34cd785e4">DEF_END_LIBTOOLS</a></div><div class="ttdeci">#define DEF_END_LIBTOOLS</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00038">tools.h:38</a></div></div>
<div class="ttc" id="a_shared_ptr_8h_html"><div class="ttname"><a href="_shared_ptr_8h.html">SharedPtr.h</a></div></div>
<div class="ttc" id="atools_8h_html_aa93f0eb578d23995850d61f7d61c55c1"><div class="ttname"><a href="tools_8h.html#aa93f0eb578d23995850d61f7d61c55c1">FALSE</a></div><div class="ttdeci">#define FALSE</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00148">tools.h:148</a></div></div>
<div class="ttc" id="a_wait_status_8h_html_aefc65d67c2144bee893b543992f694e2"><div class="ttname"><a href="_wait_status_8h.html#aefc65d67c2144bee893b543992f694e2">wt_status</a></div><div class="ttdeci">wt_status</div><div class="ttdef"><b>Definition:</b> <a href="_wait_status_8h_source.html#l00011">WaitStatus.h:11</a></div></div>
<div class="ttc" id="aclass_c_event_html_a16992490c352dc9ad55430d5dc91698d"><div class="ttname"><a href="class_c_event.html#a16992490c352dc9ad55430d5dc91698d">CEvent::Wait_Forever</a></div><div class="ttdeci">virtual wt_status Wait_Forever()</div><div class="ttdoc">一直等待事件，直到有信号时退出</div><div class="ttdef"><b>Definition:</b> <a href="_event_8cpp_source.html#l00035">Event.cpp:35</a></div></div>
<div class="ttc" id="anamespace_share_api_html_aef9c08d248e17a517235723ef2db9663"><div class="ttname"><a href="namespace_share_api.html#aef9c08d248e17a517235723ef2db9663">ShareApi::SetEvent</a></div><div class="ttdeci">LIBTOOLS BOOL SetEvent(SYNCHANDLE hEvent, BOOL bEvent)</div><div class="ttdoc">设置句柄是否有事件</div><div class="ttdef"><b>Definition:</b> <a href="_share_api_8cpp_source.html#l01291">ShareApi.cpp:1291</a></div></div>
<div class="ttc" id="a_event_8h_html"><div class="ttname"><a href="_event_8h.html">Event.h</a></div></div>
<div class="ttc" id="atools_8h_html_a798af1e30bc65f319c1a246cecf59e39"><div class="ttname"><a href="tools_8h.html#a798af1e30bc65f319c1a246cecf59e39">DWORD</a></div><div class="ttdeci">unsigned int DWORD</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00134">tools.h:134</a></div></div>
<div class="ttc" id="anamespace_share_api_html_a13ed8016535f6825c83eedef069ebe41"><div class="ttname"><a href="namespace_share_api.html#a13ed8016535f6825c83eedef069ebe41">ShareApi::WaitForSingleEvent</a></div><div class="ttdeci">LIBTOOLS DWORD WaitForSingleEvent(SYNCHANDLE hEvent, DWORD dwWaitOut)</div><div class="ttdoc">等待事件对象有信号</div><div class="ttdef"><b>Definition:</b> <a href="_share_api_8cpp_source.html#l01319">ShareApi.cpp:1319</a></div></div>
<div class="ttc" id="aclass_c_event_html_a72f175fe274eb8aa4b6f5c49c13a4a45"><div class="ttname"><a href="class_c_event.html#a72f175fe274eb8aa4b6f5c49c13a4a45">CEvent::Wait</a></div><div class="ttdeci">virtual wt_status Wait(unsigned int pred)</div><div class="ttdoc">等待事件有信号</div><div class="ttdef"><b>Definition:</b> <a href="_event_8cpp_source.html#l00024">Event.cpp:24</a></div></div>
<div class="ttc" id="aclass_c_event_html_a0f46504df9e8a7c2c500209a15af0987"><div class="ttname"><a href="class_c_event.html#a0f46504df9e8a7c2c500209a15af0987">CEvent::Handle</a></div><div class="ttdeci">virtual SYNCHANDLE Handle() const</div><div class="ttdoc">返回事件句柄</div><div class="ttdef"><b>Definition:</b> <a href="_event_8cpp_source.html#l00046">Event.cpp:46</a></div></div>
<div class="ttc" id="aclass_c_event_html_ae2c9888dbf2c9684be63500e25bae8df"><div class="ttname"><a href="class_c_event.html#ae2c9888dbf2c9684be63500e25bae8df">CEvent::CEvent</a></div><div class="ttdeci">CEvent(bool status=false, bool reset=true)</div><div class="ttdef"><b>Definition:</b> <a href="_event_8cpp_source.html#l00007">Event.cpp:7</a></div></div>
<div class="ttc" id="atools_8h_html_a01e895c2df346ffe662bbe69686d8d51"><div class="ttname"><a href="tools_8h.html#a01e895c2df346ffe662bbe69686d8d51">SYNCHANDLE</a></div><div class="ttdeci">#define SYNCHANDLE</div><div class="ttdoc">异步函数句柄</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00329">tools.h:329</a></div></div>
<div class="ttc" id="aclass_c_wait_multi_event_html"><div class="ttname"><a href="class_c_wait_multi_event.html">CWaitMultiEvent</a></div><div class="ttdoc">等待事件包装器</div><div class="ttdef"><b>Definition:</b> <a href="_event_8h_source.html#l00083">Event.h:83</a></div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>
